﻿using System;
using System.ServiceProcess;
using System.Threading.Tasks;
using EasyBackupService.Utils;

namespace EasyBackupService
{
    public partial class Service1 : ServiceBase
    {        
        public Service1()
        {
            InitializeComponent();
        }

        protected override void OnStart(string[] args)
        {            
            Log.CheckDir();
            Log.Clear();
            Schedule.CheckFile();            
            Schedule.Get();

            AppTimer.Start();
        }        

        protected override void OnStop()
        {
            AppTimer.Stop();
        }
    }
}
